import HomeView from '../views/HomeView.vue'
import {ACCESS_ENUM} from '../access/accessEnum'

export const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
  },
  {
    path: '/about',
    name: 'about',
    component: () => import('../views/AboutView.vue'),
  },
  {
    path: '/user/login',
    name: 'login',
    meta:{
        hideInMenu: true, // 在菜单中隐藏，不要渲染
    },
    component: () => import('../views/LoginView.vue'),
  },{
    // 管理员页面 只有管理员可见
    path: '/admin',
    name: '管理页面',
    // component: () => import('../views/AdminView.vue'),
    meta:{
      access:ACCESS_ENUM.ADMIN, 
    }
  },{
    // 无权限页面
    path:'/noAuth',
    name:'无权限页面',
    component:()=> import('../views/NoAuthPage.vue'),
    meta:{
      access:ACCESS_ENUM.ADMIN, 
    }
  
  }
]
